package cn.broadsense.thrid.result;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 检测图片返回结果
 *
 * @author pengxin
 * @date 2022-10-12 14:47
 */
@NoArgsConstructor
@Data
@ApiModel("检测图片物体")
public class VideoExtractResult implements Serializable {
    private static final long serialVersionUID = -4671908745321566769L;

    /**
     * 人员信息
     */
    @ApiModelProperty("人员信息坐标")
    private List<PersonsResult> persons;
    /**
     * 车辆信息
     */
    @ApiModelProperty("车辆信息坐标")
    private List<VehiclesResult> vehicles;
    /**
     * 非机动车
     */
    @ApiModelProperty("非机动车信息坐标")
    private List<NonMotoVehiclesResult> nonMotoVehicles;
    /**
     * 人脸对
     */
    @ApiModelProperty("人脸对比信息坐标")
    private List<FacesResult> faces;

    @NoArgsConstructor
    @Data
    public static class PersonsResult {
        private RectResult rect;
        private Integer objectType;
        private String feature;

        @NoArgsConstructor
        @Data
        public static class RectResult {
            private Integer leftTopX;
            private Integer leftTopY;
            private Integer rightBtmX;
            private Integer rightBtmY;
        }
    }

    @NoArgsConstructor
    @Data
    public static class VehiclesResult {
        private RectResult rect;
        private Integer objectType;
        private String feature;

        @NoArgsConstructor
        @Data
        public static class RectResult {
            private Integer leftTopX;
            private Integer leftTopY;
            private Integer rightBtmX;
            private Integer rightBtmY;
        }
    }

    @NoArgsConstructor
    @Data
    public static class NonMotoVehiclesResult {
        private RectResult rect;
        private Integer objectType;
        private String feature;

        @NoArgsConstructor
        @Data
        public static class RectResult {
            private Integer leftTopX;
            private Integer leftTopY;
            private Integer rightBtmX;
            private Integer rightBtmY;
        }
    }

    @NoArgsConstructor
    @Data
    public static class FacesResult {
        private RectResult rect;
        private String feature;
        private Integer objectType;

        @NoArgsConstructor
        @Data
        public static class RectResult {
            private Integer leftTopX;
            private Integer leftTopY;
            private Integer rightBtmX;
            private Integer rightBtmY;
        }
    }
}
